//package com.chang.jason.recyclerviewinrecyclerview;
//
//import android.content.Context;
//import android.support.v7.widget.GridLayoutManager;
//import android.support.v7.widget.RecyclerView;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.ViewGroup;
//
//import java.util.List;
//import java.util.zip.Inflater;
//
///**
// * Created by Jason.Chang on 2018-03-14.
// * explain:
// */
//
//public class MainRvAdapter extends RecyclerView.Adapter<MainRvAdapter.MyViewHolder> {
//    private Context context;
//    private List<List<String>> list;
//    public MainRvAdapter(Context context, List<List<String>> ls){
//        this.context=context;
//        this.list=ls;
//    }
//    @Override
//    public MainRvAdapter.MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
//        View view= LayoutInflater.from(parent.getContext()).inflate(R.layout.item_rv,parent,false);
//        return new MyViewHolder(view);
//    }
//
//    @Override
//    public void onBindViewHolder(MainRvAdapter.MyViewHolder holder, int position) {
//        if(holder.recyclerView.getAdapter()==null){//绑定适配器
//            holder.recyclerView.setAdapter(new GridAdapter(context,list.get(position)));
//            RecyclerView.LayoutManager manager=new GridLayoutManager(context,4);
//            manager.setAutoMeasureEnabled(true);//自适应高度
//            holder.recyclerView.setLayoutManager(manager);
//        }
//    }
//
//    @Override
//    public int getItemCount() {
//        return list.size();
//    }
//
//    public static class MyViewHolder extends RecyclerView.ViewHolder{
//        public RecyclerView recyclerView;
//        public MyViewHolder(View itemView) {
//            super(itemView);
//            recyclerView=(RecyclerView)itemView.findViewById(R.id.item_rv);
////            GridLayoutManager manager=new GridLayoutManager(itemView.getContext(),4);
////            RecyclerView.LayoutManager manager=new GridLayoutManager(itemView.getContext(),4);
////            manager.setAutoMeasureEnabled(true);//自适应高度
////            recyclerView.setLayoutManager(manager);
//        }
//    }
//}
